package com.xxyy.mylive.ui.activity;

import android.content.Intent;
import android.os.Handler;
import android.os.Message;

import com.xxyy.mylive.R;
import com.xxyy.mylive.ui.BaseActivity;

public class SplashActivity extends BaseActivity {
    private MyHandler mHandler;

    @Override
    protected void setContentView() {
        setContentView(R.layout.activity_splash);
    }

    @Override
    protected void initUI() {

    }

    @Override
    protected void setListener() {

    }

    @Override
    protected void initData() {
        mHandler = new MyHandler();
        Message message = Message.obtain();
        message.what = 1;
        mHandler.sendMessageDelayed(message, 2000);
    }

    private class MyHandler extends Handler {
        @Override
        public void handleMessage(Message msg) {
            if (msg.what == 1) {
                startActivity(new Intent(SplashActivity.this, LoginActivity.class));
                finish();
            }
        }
    }
}
